package com.nuoniu.sibanyun.entity.finance;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.nuoniu.sibanyun.common.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * <p>
 * 存货明细账
 * </p>
 *
 * @author 小啊刚
 * @since 2021-05-26
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("fag_subsidiary")
@ApiModel(value="InSubsidiary对象", description="存货明细账")
public class InSubsidiary extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "公司id")
    @TableField("company_id")
    private Integer companyId;

    @ApiModelProperty(value = "账套id")
    @TableField("account_id")
    private Integer accountId;

    @ApiModelProperty(value = "账套年份")
    @TableField("account_year")
    private Integer accountYear;

    @ApiModelProperty(value = "账套期间")
    @TableField("account_period")
    private Integer accountPeriod;

    @ApiModelProperty(value = "存货id")
    @TableField("inventory_id")
    private Integer inventoryId;

    @ApiModelProperty(value = "存货名称")
    @TableField("inventory_name")
    private String inventoryName;

    @ApiModelProperty(value = "存货编码")
    @TableField("inventory_code")
    private String inventoryCode;

    @ApiModelProperty(value = "单据id")
    @TableField("voucher_id")
    private Integer voucherId;

    @ApiModelProperty(value = "单据日期")
    @TableField("voucher_date")
    private LocalDate voucherDate;

    @ApiModelProperty(value = "单据编号")
    @TableField("voucher_code")
    private String voucherCode;

    @ApiModelProperty(value = "业务类型")
    @TableField("data_source")
    private String dataSource;

    @ApiModelProperty(value = "暂估标志")
    @TableField("pe_flag")
    private Boolean peFlag;

    @ApiModelProperty(value = "实发金额自填标志")
    @TableField("money_flag")
    private Boolean moneyFlag;

    @ApiModelProperty(value = "收发标志1收 2发")
    @TableField("rd_flag")
    private Integer rdFlag;

    @ApiModelProperty(value = "销售取数标志")
    @TableField("sale_flag")
    private Boolean saleFlag;

    @ApiModelProperty(value = "记账人id")
    @TableField("account_user_id")
    private Integer accountUserId;

    @ApiModelProperty(value = "记账人名称")
    @TableField("account_user_name")
    private String accountUserName;

    @ApiModelProperty(value = "记账日期")
    @TableField("account_date")
    private LocalDateTime accountDate;

    @ApiModelProperty(value = "批号")
    @TableField("batch_code")
    private String batchCode;

    @ApiModelProperty(value = "发票子表标识")
    @TableField("bill_code")
    private String billCode;

    @ApiModelProperty(value = "客户编码")
    @TableField("crm_code")
    private String crmCode;

    @ApiModelProperty(value = "备注")
    @TableField("remarks")
    private String remarks;

    @ApiModelProperty(value = "科目编码")
    @TableField("accounting_code")
    private String accountingCode;

    @ApiModelProperty(value = "业务员编码")
    @TableField("person_code")
    private String personCode;

    @ApiModelProperty(value = "生产批号")
    @TableField("product_code")
    private String productCode;

    @ApiModelProperty(value = "凭证id")
    @TableField("v_id")
    private Integer vId;

    @ApiModelProperty(value = "凭证摘要")
    @TableField("v_remark")
    private String vRemark;

    @ApiModelProperty(value = "凭证编号")
    @TableField("v_code")
    private String vCode;

    @ApiModelProperty(value = "凭证日期")
    @TableField("v_date")
    private LocalDateTime vDate;

    @ApiModelProperty(value = "供应商编码")
    @TableField("vendor_code")
    private String vendorCode;

    @ApiModelProperty(value = "仓库id")
    @TableField("warehouse_id")
    private Integer warehouseId;

    @ApiModelProperty(value = "仓库名称")
    @TableField("warehouse_name")
    private String warehouseName;

    @ApiModelProperty(value = "收入单价")
    @TableField("in_price")
    private BigDecimal inPrice;

    @ApiModelProperty(value = "收入金额")
    @TableField("in_amount")
    private BigDecimal inAmount;

    @ApiModelProperty(value = "收入数量")
    @TableField("in_quantity")
    private BigDecimal inQuantity;

    @ApiModelProperty(value = "发出金额")
    @TableField("out_amount")
    private BigDecimal outAmount;

    @ApiModelProperty(value = "发出数量")
    @TableField("out_quantity")
    private BigDecimal outQuantity;

    @ApiModelProperty(value = "发出单价")
    @TableField("out_price")
    private BigDecimal outPrice;

    @ApiModelProperty(value = "贷款差异")
    @TableField("credit_difference")
    private BigDecimal creditDifference;

    @ApiModelProperty(value = "未调整数量")
    @TableField("no_just_quantity")
    private BigDecimal noJustQuantity;
}
